home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / CNews / Source / libbig / sys.fast.c < prev   
Encoding:
C/C++ Source or Header  |  1992-03-18  |  734 b   |  57 lines

  1. /*
  2.  * news sys file reading functions (fast, big, in-memory version)
  3.  */
  4.  
  5. #include <stdio.h>
  6. #include <sys/types.h>
  7. #include "news.h"
  8. #include "ngmatch.h"
  9. #include "system.h"
  10.  
  11. /* imports */
  12. extern struct system *currsys, *firstsys;
  13.  
  14. /* private */
  15. static struct system *thissys = NULL;
  16.  
  17. void
  18. remmysys(sys)                /* remember this system */
  19. struct system *sys;
  20. {
  21.     thissys = sys;
  22. }
  23.  
  24. struct system *
  25. mysysincache()                /* optimisation */
  26. {
  27.     return thissys;
  28. }
  29.  
  30. void
  31. setupsys(fp)
  32. FILE *fp;
  33. {
  34.     rewind(fp);
  35. }
  36.  
  37. boolean
  38. donesys()
  39. {
  40.     return NO;
  41. }
  42.  
  43. /* ARGSUSED */
  44. void
  45. rewsys(fp)
  46. FILE *fp;
  47. {
  48.     currsys = firstsys;
  49. }
  50.  
  51. void
  52. advcurrsys()    /* advance currsys to the next in-core sys entry, if any. */
  53. {
  54.     if (currsys != NULL)
  55.         currsys = currsys->sy_next;
  56. }
  57.